package com.yw.common.core.util;

import com.yw.common.core.Constant;
import com.yw.common.core.db.DbTypeEnum;
import com.yw.common.core.fs.FileTypeEnum;

/**
 * 常量配置工具
 * @author aoshiguchen
 * @time 2015-09-09
 */

public final class ConstantUtil {
	
	public static void setConfigFilePath(String filePath){
		Constant.CONFIG_FILE_PATH = filePath;
	}
	
	public static String getConfigFilePath(){
		return Constant.CONFIG_FILE_PATH;
	}
	
	public static void setConfigFileType(FileTypeEnum fileType){
		Constant.CONFIG_FILE_TYPE = fileType;
	}
	
	public static FileTypeEnum getConfigFileType(){
		return Constant.CONFIG_FILE_TYPE;
	}
	
	public static void setDbTypeKeyName(String keyName){
		Constant.DB_TYPE_KEY_NAME = keyName;
	}
	
	public static String getDbTypeKeyName(){
		return Constant.DB_TYPE_KEY_NAME;
	}
	
	public static void setDbHostKeyName(String keyName){
		Constant.DB_HOST_KEY_NAME = keyName;
	}
	
	public static String getDbHostKeyName(){
		return Constant.DB_HOST_KEY_NAME;
	}
	
	public static void setDbNameKeyName(String keyName){
		Constant.DB_NAME_KEY_NAME = keyName;
	}
	
	public static String getDbNameKeyName(){
		return Constant.DB_NAME_KEY_NAME;
	}
	
	public static void setDbLoginNameKeyName(String keyName){
		Constant.DB_LOGIN_NAME_KEY_NAME = keyName;
	}
	
	public static String getDbLoginNameKeyName(){
		return Constant.DB_LOGIN_NAME_KEY_NAME;
	}
	
	public static void setDbLoginPasswordKeyName(String keyName){
		Constant.DB_LOGIN_PASSWORD_KEY_NAME = keyName;
	}
	
	public static String getDbLoginPasswordKeyName(){
		return Constant.DB_LOGIN_PASSWORD_KEY_NAME;
	}
	
	public static void setDbType(DbTypeEnum type){
		Constant.DB_TYPE = type;
	}
	
	public static DbTypeEnum getDbType(){
		return Constant.DB_TYPE;
	}
	
}
